class UserInfo {
  final String id;
  final String name;
  final String mail;

  UserInfo({required this.id, required this.name,  required this.mail});

  // manual serialization
  Map<String, dynamic> toJson() {
    return {
      'id': id,
      'name': name,
      'mail': mail,
    };
  }

  factory UserInfo.fromJson(Map<String, dynamic> json) {
    return UserInfo(
      id: json['id'],
      name: json['name'],
      mail: json['mail'],
    );
  }
}
